<%@page contentType="text/html" pageEncoding="UTF-8"%>
 <!DOCTYPE html>
<html class=""><head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <meta charset="UTF-8">
        <title>NutriWeb - Praticando alimentação saudável</title>

        <meta class="viewport" name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
  
        <!-- Favicon -->
        <link rel="shortcut icon" href="a_data/icone_nutriweb.ico">
        <!--[if IE]><link rel=" shortcut icon" href="a_data/icone_nutriweb.ico"><![endif]-->
        <link rel="icon" href="a_data/icone_nutriweb.png">

     
     <!-- Font -->
        <link rel="stylesheet" href="arquivos_arquivos/css.css">
        <!-- Plagins CSS -->
        <link rel="stylesheet" href="arquivos_arquivos/buttons.css">
        <link rel="stylesheet" href="arquivos_arquivos/social-icons.css">
        <link rel="stylesheet" href="arquivos_arquivos/font-awesome.css">
        <link rel="stylesheet" href="arquivos_arquivos/bootstrap.css">
        <link rel="stylesheet" href="arquivos_arquivos/jslider.css">
        <link rel="stylesheet" href="arquivos_arquivos/settings.css">
        <link rel="stylesheet" href="arquivos_arquivos/jquery.css">
        <link rel="stylesheet" href="arquivos_arquivos/animate.css">
        <link rel="stylesheet" href="arquivos_arquivos/video-js.css">
        <link rel="stylesheet" href="arquivos_arquivos/morris.css">
        <link rel="stylesheet" href="arquivos_arquivos/royalslider.css">
        <link rel="stylesheet" href="arquivos_arquivos/rs-minimal-white.css">
        <link rel="stylesheet" href="arquivos_arquivos/layerslider.css">
        <link rel="stylesheet" href="arquivos_arquivos/ladda.css">
        <link rel="stylesheet" href="arquivos_arquivos/datepicker.css">
        <link rel="stylesheet" href="arquivos_arquivos/jquery_002.css">
        <!-- Theme CSS -->
        <link rel="stylesheet" href="a_data/style.css">
        <!-- Responsive CSS -->
        <link rel="stylesheet" href="a_data/responsive.css">
        <!-- Custom CSS -->
        <link rel="stylesheet" href="a_data/pages.css">
        <link rel="stylesheet" href="a_data/home-pages-customizer.css">
        <!-- IE Styles-->
        <link rel="stylesheet" href="a_data/ie.css">
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
              <link rel='stylesheet' href="css/ie/ie8.css">
        <![endif]-->
        <style type="text/css">
            .jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}</style>
        <style type="text/css">.fancybox-margin{margin-right:19px;}</style>
        <script style="" src="arquivos_arquivos/commonutilstats.js" charset="UTF-8" type="text/javascript"></script>
    </head>
    <body class="fixed-header loaded fixed">
       
<div class="page-box">
<div class="page-box-content">
                <%@include file="/templates/header.jsp"%>  
                <div class="breadcrumb-box">
                    <div class="container">
                        <ul class="breadcrumb">
                            <li><a href="inicio.jsp">Início</a> </li>
                        </ul>
                    </div>
                </div>
                <%@include file="/templates/welcome.jsp"%>
<div class="clearfix"></div>

<section id="main" class="login-register">
    
<!-- banner -->
<!--<center>
    <div>
        <img src="img/content/band-5.jpg" width="900px" alt="Logo do Software NutriWeb.">
    </div>
    <h2 class="title" style=" color: rgb(192, 7, 64);font-size: 18px;font-weight: normal;margin: 0px 0px 12px;padding: 14px 0px 0px;">
        Praticando Alimentação Saudável
        <hr class="shadow" style="margin: 10px 0px;"></hr>
    </h2>
</center>-->
 <!--fim  banner -->
    
  <header class="page-header">
    <div class="container">
      <h1 class="title">Início</h1>
    </div>	
  </header>
  <div class="container">
    <div class="row">
        <div class="row">
                  <center>
  <!--descrição do aimentoem texto--> 
        <div class="col-sm-7 bottom-padding">
		
  <div class="content-block bottom-padding frame-shadow-lifted bg">
	
					  <p align="justify">&nbsp;&nbsp;&nbsp;&nbsp;
                          Com base nos 10 passos do guia alimentar da população brasileira, elaborado pelo ministério da saúde, nosso sistema objetiva 
						  monitorar a alimentação de um usuário. Com a finalidade de ajudá-lo a fazer uma reeducação alimentar, orientando com 
						  porções mínimas necessárias a ingerir em relação aos períodos de refeições realizados.<BR/> 
						  &nbsp;&nbsp;&nbsp;&nbsp;
						  Alertando que, pessoas com necessidades extras de 
						  orientação nutricional deverão procurar um nutricionista. <BR/> 
						  &nbsp;&nbsp;&nbsp;&nbsp;A orientação segue 10 passos. Sendo gradativa a adaptação, a saber:
</p><p>  
</div>
         	  <div class="bottom-padding">
		
		<div class="row steps steps-apart">
		  <div class="col-sm-4 col-md-4">
			<div class="step text-center border-error">
			  <div class="step-wrapper">
				<div class="title-box text-center">
				  <h4 class="title">1</h4>
				</div>
				<p>Faça pelo menos 3 refeições (café-da-manhã, almoço e jantar) 
				e 2 lanches saudáveis por dia. Não pule as refeições.
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				</p>
			  </div>
			</div>
		  </div>
		  
		  <div class="col-sm-4 col-md-4">
			<div class="step text-center border-warning bg-warning white">
			  <div class="step-wrapper">
		 		<div class="title-box text-center title-white">
				  <h4 class="title">2</h4>
				</div>
				<p>Inclua diariamente 6 porções do grupo dos cereais (arroz,
				milho, trigo, pães e massas), tubérculos como as batatas e raízes como a mandioca nas refeições. 
				Dê preferência aos grãos integrais e aos alimentos na sua forma mais natural. </p>
			  </div>
			</div>
		  </div>

		  <div class="col-sm-4 col-md-4">
			<div class="step text-center border-success  ">
			  <div class="step-wrapper">
			
			<div class="title-box text-center  ">
				  <h4 class="title">3</h4>
				</div>
				<p>Coma diariamente pelo menos 3 porções de legumes e verduras como parte das refeições e 3 porções ou mais de
				frutas nas sobremesas e lanches.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			
				</p>
			  </div>
			</div>
		  </div>

		  <div class="col-sm-4 col-md-4">
			<div class="step text-center border-error bg-error white">
			  <div class="step-wrapper">
			 	<div class="title-box text-center title-white">
				  <h4 class="title">4</h4>
				</div>
				<p>Coma feijão com arroz todos os dias ou, pelo menos,
				5 vezes por semana. Esse prato brasileiro é uma combinação completa de proteínas e bom para a saúde. 
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</p>
			  </div>
			</div>
		  </div>


		  <div class="col-sm-4 col-md-4">
			<div class="step text-center  border-warning  ">
			  <div class="step-wrapper">
			 	<div class="title-box text-center ">
				  <h4 class="title">5</h4>
				</div>
				<p>Consuma diariamente 3 porções de leite e derivados e 
				1 porção de carnes, aves, peixes ou ovos. Retirar a gordura
				aparente das carnes e a pele das aves antes da preparação torna esses alimentos mais saudáveis! </p>
			  </div>
			</div>
		  </div>


		  <div class="col-sm-4 col-md-4">
			<div class="step text-center border-success bg-success white">
			  <div class="step-wrapper">
			 	<div class="title-box text-center title-white">
				  <h4 class="title">6</h4>
				</div>
				<p>Consuma, no máximo, 1 porção por dia de óleos vegetais, 
				azeite, manteiga ou margarina.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</p>
			  </div>
			</div>
		  </div>


		  <div class="col-sm-4 col-md-4">
			<div class="step text-center border-error">
			  <div class="step-wrapper">
			 	<div class="title-box text-center ">
				  <h4 class="title">7</h4>
				</div>
				<p> Evite refrigerantes e sucos industrializados, bolos, 
				biscoitos doces e recheados, sobremesas e outras guloseimas como 
				regra da alimentação. </p>
			  </div>
			</div>
		  </div>


		  <div class="col-sm-4 col-md-4">
			<div class="step text-center border-warning bg-warning white">
			  <div class="step-wrapper">
			 	<div class="title-box text-center title-white">
				  <h4 class="title">8</h4>
				</div>
				<p>Diminua a quantidade de sal na comida e retire o saleiro da 
				mesa.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</p>
			  </div>
			</div>
		  </div>


		  <div class="col-sm-4 col-md-4">
			<div class="step text-center border-success ">
			  <div class="step-wrapper">
			 	<div class="title-box text-center  ">
				  <h4 class="title">9</h4>
				</div>
				<p>Beba pelo menos 2 litros (6 a 8 copos) de água por dia. 
				Dê preferência ao consumo de água nos intervalos das refeições.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</p>
			  </div>
			</div>
		  </div>

		  <div class="col-sm-4 col-md-4">
			<div class="step text-center border-error bg-error white">
			  <div class="step-wrapper">
			 	<div class="title-box text-center title-white">
				  <h4 class="title">10</h4>
				</div>
				<p>Torne sua vida mais saudável. Pratique pelo menos 30 minutos de atividade física todos os dias e evite as bebidas alcoólicas e o fumo. </p>
			  </div>
			</div>
		  </div>
		</div>
	  </div>      
   		</div>					
                  
              
            <div class="col-sm-4 ">
                  		 

			  
			    <div class="  bottom-padding">
			 <blockquote class="no-margin" style="padding:10px; 
			 background: none repeat scroll 0% 0% rgb(254, 222, 223);
			 border-left:2px solid rgb(254, 210, 210)
			 ">
		<footer  style="
		font-size: 150%;color: rgb(249, 242, 244); background:rgb(199, 37, 78);">
		Como <code style="padding:0px 4px">começar</code> com o NutriWeb?</footer>			 
			<br/> <p align="justify">&nbsp;&nbsp;&nbsp;Você só precisa registrar durante o dia quanto você bebeu, 
			 comeu ou praticou. E então, nós calculamos quanto 
			 falta para completar nesse dia. 
			 </p>
			 
			 <p align="justify"> <br/> &nbsp;&nbsp;&nbsp;
			 Ao beber, o ideal é beber no mínimo 2L de água por
			dia.
		<% if (session.getAttribute("nm_email") != null) { %>			  
		Indique a quantidade ingerida:
			<p align="center"><a href="beber.jsp" class="btn btn-default">Beber</a>  
            </p>
		<%}%>
			</p>
			
			 <p align="justify"> <br/> &nbsp;&nbsp;&nbsp;
			 Ao treinar alguma atividade física, o mínimo indicado são 30min.
		<% if (session.getAttribute("nm_email") != null) { %>			  
			 Descreva o que você praticou:
			<p align="center"><a href="treino.jsp" class="btn btn-default">Praticar</a>  
            </p>
		<%}%>
			</p>
			
			
			 <p align="justify"> <br/> &nbsp;&nbsp;&nbsp;
			 Ao comer, há porções dos grupos alimentares que são 
			 suficientes por dia para se manter saudável. 
			 <p align="center">Ex.:

			
			<span class="word-rotate border border-error loaded">
			<span class="words-box">
				<span>Cereais, tubérculos, raízes e derivados;</span>
				<span>Feijões;</span>
				<span>Frutas e sucos de frutas naturais;</span>
				<span>Legumes e Verduras;</span>
				<span>Leite e Derivados;</span>
				<span>Carnes e ovos;</span>
				<span>Óleos, gorduras e sementes oleaginosas;</span>
				<span>Açúcares e doces.</span>
			</span>
			</span>
			</p>

			<p align="justify">  <br/> &nbsp;&nbsp;&nbsp;
				<% if (session.getAttribute("nm_email") != null) { %>			  
			 Separado por período e grupo alimentar, insira quanto de um alimento
			 você comeu até o momento:
			<p align="center"><a  href="cafe_manha.jsp" class="btn btn-default">Comer</a> 
            </p>
			<%}%>

</p>
			
			
			
			
			
			 
		
<br/>
        
      <div class="rotation employee">
                      <div class="default">
                        <div class="image"> <img src="arquivos_arquivos/team-3.jpg" alt="" title="" height="270" width="270"> </div>
                        <div class="description">
                          <div class="vertical">
                            <h3 class="name">Quer uma dica?</h3>
                            <br/>
                            <div class="role">Passe sobre a imagem e veja algumas orientações.</div>
                          </div>
                        </div>
                      </div>
                      <div class="employee-hover">
                        <h3 align="center">Consumo no almoço:</h3>
                        <h6 align="center">Nas refeições principais, 
						preencha metade do seu prato com
                          cereais, raízes e tubérculos.</h6>
                      </div>
                      <!-- .employee-hover --> 
                    </div>                       
          
		</blockquote>
		 
			  
					  
                       
                    
</div>	 

          
</div>	                
				</center>
                  <!-- .employee --> 
                
				</div>
				
				
    </div>
  </div><!-- .container -->

	
</section><!-- #main -->
<% if (session.getAttribute("nm_email") != null) { %>
  <div id="cm-our-skills" class="full-width-box bottom-padding">
	  <div class="fwb-bg band-19"><div class="overlay"></div></div>
	  
	  <div class="container">
		<div class="title-box text-center" data-appear-animation="fadeInDown">
		  <h1 class="title">Obtido hoje:</h1>
		</div>
		<div class="row">
                    <%
                        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
                        Integer total = 0;
                        Integer parcial = 0;
                        Integer percent = 0;
                        Integer recommended = 120; //24*5

                        SQL = "SELECT SUM(distinct qt_porcao) FROM \"Operacoes\".\"USUARIO_REFEICAO\" "
                                + "WHERE dt_usuario_refeicao = '" + new java.sql.Date(df.parse(df.format(new Date().getTime())).getTime()) + "' "
                                + "AND cd_usuario = " + Long.parseLong(session.getAttribute("cd_usuario").toString()) + " ";

                        try {
                            System.out.println(SQL);
                            for (Object[] reg : Conexao.getQuery(SQL)) {
                                if (reg[0] != null) {
                                    parcial = parcial + (int) Double.parseDouble(reg[0].toString());
                                }
                            }
                            percent = (int) Math.round(((parcial * 100) / recommended));
                            if (percent > 100) percent = 100;
                            total += (percent*2);
                    %>
		  <div class="col-sm-6 col-md-3 progress-circular bottom-padding bottom-padding-mini" data-appear-animation="fadeInLeftBig">
		<p style="color:white; font-size: 20px; " data-fgcolor="#738d00" >Alimentação</p>	
		<!--a alteração da porcentagem está no atributo "rel" do input-->
		<input type="text" class="knob" value="0" rel="<%=percent%>" data-linecap="round" data-width="200" data-bgcolor="#f2f2f2" data-fgcolor="#738d00" data-thickness=".15" data-readonly="true" disabled="">
		  </div>
                  <%
                      } catch (Exception e) {
                          out.println("Atenção, " + e.getLocalizedMessage());
                      }

                      parcial = 0;
                      Integer diaria = 2000;

                      SQL = "SELECT SUM(distinct qt_hidratacao) FROM \"Operacoes\".\"HIDRATACAO\" "
                              + " WHERE date(dt_hidratacao) = '" + new java.sql.Date(df.parse(df.format(new Date().getTime())).getTime()) + "' "
                              + " AND cd_usuario = " + Long.parseLong(session.getAttribute("cd_usuario").toString()) + " ";

                      try {
                          for (Object[] reg : Conexao.getQuery(SQL)) {
                              if (reg[0] != null) {
                                  parcial = parcial + (int) Double.parseDouble(reg[0].toString());
                              }
                          }
                          percent = (int) Math.round(((parcial * 100) / diaria));
                          if (percent > 100) percent = 100;
                          total += percent;
                  %>
		  <div class="col-sm-6 col-md-3 progress-circular bottom-padding bottom-padding-mini" data-appear-animation="bounceInLeft">
			<p style="color:white; font-size: 20px; " data-fgcolor="#738d00" >Hidratação</p>	
			<!--a alteração da porcentagem está no atributo "rel" do input-->
			<input type="text" class="knob" value="0" rel="<%=percent%>" data-linecap="round" data-width="200" data-bgcolor="#f2f2f2" data-fgcolor="#0098ca"data-thickness=".15" data-readonly="true" disabled="">
		  </div>
                      <%  
                          } catch (Exception e) {
                              out.println("Atenção, " + e.getLocalizedMessage());
                          }
                      
                          parcial = 0;
                          percent = 0;
                          Integer tempo = 30;
                          
                          SQL = "SELECT SUM(distinct qt_atividade_fisica) FROM \"Operacoes\".\"ATIVIDADE_FISICA\" "
                                  + " WHERE dt_atividade_fisica = '" + new java.sql.Date(df.parse(df.format(new Date().getTime())).getTime()) + "' "
                                  + " AND cd_usuario = " + Long.parseLong(session.getAttribute("cd_usuario").toString()) + " ";
                          try {
                              for (Object[] reg : Conexao.getQuery(SQL)) {
                                  if (reg[0]!=null){
                                    parcial = parcial + (int) Double.parseDouble(reg[0].toString());
                                  }
                              }
                              percent = (int) Math.round(((parcial * 100) / tempo));
                              if (percent > 100) percent = 100;
                              total += percent;
                      %>
		  <div class="col-sm-6 col-md-3 progress-circular bottom-padding bottom-padding-mini" data-appear-animation="bounceInRight">
			<p style="color:white; font-size: 20px; " data-fgcolor="#738d00" >Treino</p>	
		<!--a alteração da porcentagem está no atributo "rel" do input-->
                <input type="text" class="knob" value="0" rel="<%=percent%>" data-linecap="round" data-width="200" data-bgcolor="#f2f2f2" data-fgcolor="#f89406" data-thickness=".15" data-readonly="true" disabled="">
		  </div>
                      <%  
                          } catch (Exception e) {
                              out.println("Atenção, " + e.getLocalizedMessage());
                          }
                          
                          percent = (int) Math.round(total/4);//3
                      %>                    

		  <div class="col-sm-6 col-md-3 progress-circular bottom-padding bottom-padding-mini" data-appear-animation="fadeInRightBig">
			<p style="color:#c10841; font-size: 20px; "   ><b>Total Diário</b></p>	
		<!--a alteração da porcentagem está no atributo "rel" do input-->
			<input type="text" class="knob" value="0" rel="<%=percent%>" data-linecap="round" data-width="200" data-bgcolor="#f2f2f2" data-fgcolor="#c10841"  data-thickness=".15" data-readonly="true" disabled="">
		  </div>
		</div>
		
		<div class="clearfix"></div>
	  </div>
	</div><!-- .full-width-box -->
<% } %>
</div><!-- .page-box-content -->

</div><!-- .page-box -->

<%@include file="/templates/footer.jsp"%> 
        <div class="clearfix"></div>

        <script async="" src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/www-widgetapi.js" id="www-widgetapi-script"></script><script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/iframe_api"></script><script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_015.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/bootstrap.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jshashtable-2.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_018.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/tmpl.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_012.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/draggable-0.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_021.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_016.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_022.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_009.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_019.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_011.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_007.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_008.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_005.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/isotope.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_006.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_017.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_020.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_003.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_013.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/SmoothScroll.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/country.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/spin.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/ladda.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/masonry.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/morris.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/raphael.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/video.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/pixastic.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/livicons-1.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/greensock.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/layerslider_002.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/layerslider.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_014.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_004.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/bootstrapValidator.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/bootstrap-datepicker.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_010.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jplayer.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/jquery_002.js"></script>
        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/main.js"></script>


        <script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/js" type="text/javascript"></script><script src="Accordions%20&amp;%20Toggles%20_%20Progressive%20%E2%80%94%20Responsive%20Multipurpose%20HTML%20Template_arquivos/main_002.js"></script>
    </body>

</html>
